Skip to content

Correctly transform uint8array to string #696

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 20, 2021
Merged

Correctly transform uint8array to string #696

merged 2 commits into from
Dec 20, 2021

Conversation

fstasi
Copy link
Contributor

@fstasi fstasi commented Dec 16, 2021

Why

IDE2 currently converts larger files to uint8arrays. When a file is then pushed to the cloud it needs to be conferted back to a string.

This process fails miserably, as we are trying to use new TextDecoder().decode(content) which is broken in the electron version used by theia (electron/electron#18733)

How

Replace new TextDecoder().decode(content) with new util.TextDecoder().decode(content)

@AlbyIanna
Copy link
Contributor

fixes #634

Copy link
Contributor

@AlbyIanna AlbyIanna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fstasi fstasi merged commit f400810 into main Dec 20, 2021
@fstasi fstasi deleted the sketch-sync-push branch December 20, 2021 13:56
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Mar 1, 2023
@per1234 per1234 added the topic: cloud Related to Arduino Cloud and cloud sketches label Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: cloud Related to Arduino Cloud and cloud sketches topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants